When known DBMSs (Database Management Systems) execute a database query against a base table or a set of base tables, a materialized view may be accessed instead. The materialized view may have a definition that is based on the query result. A materialized view may contain computed data based on existing data found in a base table or base tables. The materialized view is associated or related to the base tables (that is, the definition of the materialized view is based on the base tables). The materialized view may be used by the DBMS for optimizing or improving a response time when processing a database query which may be applied against a set of base tables associated with the materialized view. The database query may be rewritten or recompiled by the DBMS in which the recompiled, executable query may direct the DBMS to access the materialized view (the data stored in the materialized view was previously computed), and hence reduce the response time of the database query. However, in order to ensure the integrity of the original database query (once the query has been rewritten to access the associated materialized view), the data contained in the materialized view must be maintained to match the query definition of the materialized view.
Known DBMSs may include operation for fully refreshing a materialized view. This known operation requires a significant amount of time and computation effort to execute, which may be unsatisfactory and inconvenient because fully refreshing the materialized view may require a complete recomputation of a materialized view definition. Recomputation of a materialized view definition includes operations for evaluating the query that the materialized view is defined on and operation for populating the materialized view with the result of this query.
Referring to U.S. Pat. No. 6,205,451 (titled, “Method and Apparatus for Incremental Refresh of Summary Tables in a Database System”), there is described a method and a system for incremental refresh of materialized views after a load append operation is performed; more specifically, this reference describes a method for performing an operation for incrementally refreshing a materialized view once load appended rows of a base table (or base tables) are located or found. It is noted that this reference identifies U.S. Pat. No. 5,848,405 (titled, “Method and Apparatus for Identifying New Data by Address Ranges”) which teaches a method and a system for finding delta rows that may be used for incrementally maintaining the materialized view described in U.S. Pat. No. 6,205,451. The combination of the aforementioned references disadvantageously require all materialized views to be refreshed at the same time after associated base tables have been loaded. The following example shows the limits that may be realized by the combination of U.S. Pat. No. 6,205,451 and U.S. Pat. No. 5,848,405. Assuming that a base table B1 has two associated or related materialized views A1 and A2, a user may perform N load append operations on the base table B1. Then the user may incrementally refresh the materialized view A1. However, if the user desires to load additional data into the base table B1, the user is required to refresh the materialized view A2 before the second set of data may be load appended to the base table B1 (which may present an inconvenient limitation for the user).
Accordingly, a solution that addresses, at least in part, this and other shortcomings is desired.